Class 9 Assignment | Suitability Analysis (v2)

Thematic Layer Inputs Normalized to Consistent Scale for Suitability

Class 9 Concepts & Themes:

This week’s assignment will encompass the following concepts covered in Class 9 lecture & lab:

  • Suitibility Model and Methods
  • Map Algebra
  • Reclassification
  • Multi-criteria evaluation (MCE)
  • Spatial vs. Logical Operators
  • Operations - Local, Neighborhood, Zonal & Global

Class 9 Readings:

This week’s readings will include 1 section from the Essentials of Geographic Information Systems textbook.

The class 9 quiz will cover only content from the Essentials of Geographic Information Systems textbook as follows:

  • Chapter 7 - Spatial Analysis of Raster Data

    • Single Layer Analysis
      • Pages 131 - 132
    • Multiple Layer Analysis
      • Pages 133 - 134
    • Raster Operations
      • Pages 135 - 138
  • Context Reading (following material will not be quizzed, but helpful to understand assignment context):

  • Class 9 Context Readings

  • Finding Suitable Locations | Chapter 2 (Suitability Overview)

  • What is Map Algebra?

  • Raster Calculator Overview

  • Raster Calculator Appendix - Map Algebra

Assignment Overview:

  • Review Class 9 Lab to ensure that you have a firm understanding of the following concepts:

    • Raster Reclassification
    • Map Algebra
    • MCE evaluation methods

IDP Camp Suitability Assignment - The Ugandan Civil War:

  • All suitability analysis has multiple criteria across thematic layers. Read the project overview Assignment Suitability Overview to understand the criteria and goals of the project before proceeding into detailed steps. Below is a short listing of the project criteria:

  • IDP Camp Suitability:

    • A suitable site should be between 2 and 7 degrees of slope.
    • A suitable site should be within 5 KM of roads.
    • A suitable site should be within 25 KM of urban centers.
    • A suitable site also should be located 5 KM outside of the highly urban centers.
    • A suitable site should also be at least 10 KM of Unexploded ordnance (UXO)
    • A suitable site should be able to carry a capacity of 10,000 to 20,000 displaced persons. Suitability Workflow for Assignment 9

Note 2: For those on Windows machines, the standalone QGIS download offers two application options - one without GRASS tools and one with GRASS tools bundled. For this assignment, you will need GRASS tools activated to accomplish one of the conversions - vector to raster. You can access the QGIS instance with GRASS tool bundled from the Windows Start Menu, navigating to QGIS folder and choosing the correct QGIS version:

GRASS Tool Integration w/in QGIS

  • Step 1, as notated in the C9 Assignment Suitability Overview, the first criteria for accessing suitable locations for IDP camps in Uganda involves determining suitable slope. During Class 5, slope was addressed so the process will be similar here.

    • The first criteria is: areas with a gradient (slope) of between 2 and 7 degrees
    • The first step will prepare the input DEM data for slope calculations.
  • To start, connect your data folder for the assignment, and create an exports folder to place your processing outputs throughout the project:

    Connect Data Direction to QGIS Project

  • Import the hdr.adf raster file into Map canvas. These are the raw elevation values supplied by the SRTM shuttle satellite in raster format. They are currently in a proprietary ESRI .hdr labeling format, often referred to as ESRI BIL format.

    Import Raster Layer

    • hdr.adf raster placed into Layers Panel:

    Import Raster Layer

    • Next run Slope from Raster > Terrain Analysis > Slope. Make sure to utilize a Z value of 0.00000898 which is the value used for locations near zero latitude which is the case for Uganda. More on Z values for raster data in WGS84 can be found in the furter reference section at bottom of assignment:

    Slope Tool

    • Save Slope as Uganda_Slope in GeoTIFF format using Z factor of 0.00000898 into exports folder:

    Slope with Z Factor Applied

    • Explanation of Z Factor Here

    • Its important to review the raster values that are produced by a geoprocess. By showing actual values under pseudocolor ramp, both the values array can be seen in the Layers panel as well a vividly in the raster within Map canvas:

    Review Raster Result

    Note that the slope values are 0 to 72.4; these units are degrees of slope. Towards the end of the process, threshold values between 2 and 7 degrees will be selected as part of the model suitability for IDP camp locations. Save your .qgs project and move to Step 2 below:

    Review Raster Result

  • Step 2, following the slope analysis above, the second criteria theme is sites in proximity to roads; in this specific case Within 5 Kilometers of a Road(s). To start, input Roads.shp and run a BUFFER analysis for 5 KM upon Roads.shp:

    Buffer Process

    • Note that Roads.shp is projected to its correct UTM zone, thus units are in meters. Utilize 5000 meters as distance and 30 as Segments input; name output roads_5km_buff.shp:

    Distance Buffer

    • Check BUFFER results, ensuring correct distance and fully dissolved 1 polygon feature:

    Distance Buffer

  • Step 3, following the slope and roads BUFFER analysis, the third criteria theme is sites in proximity to markets (Populated Places will act as proxy for Markets); in this specific case Within 25 Kilometers of a Market(s). To start, input Populated_Places.shp and run a BUFFER analysis for 25 KM upon Populated_Places.shp:

    Distance Buffer

    • Note that Populated_Places.shp is projected to its correct UTM zone, thus units are in meters. Utilize 25000 meters as distance and 30 as Segments input; output as Market_Access.shp:

    Distance Buffer

    • Check BUFFER results, ensuring correct distance and fully dissolved 1 polygon feature:

    Buffer Dissolve

  • Step 4, before proceeding to other criteria, an intermediate step of INTERSECT between roads_5km_buff.shp and Market_Access.shp will produce suitable areas that meet 2 criteria - proximity to roads and markets:

    Intersection

    • Conduct the INTERSECT inputs and output as Road_Market_Access.shp. *Note: Buffer is the default addition in Layers Panel- to be sure you have the correct inputs, pull roads_5km_buff.shp and Market_Access.shp directly into Layers Panel before proceeding:

    Intersection

    • Check Buffer results, ensuring correct distance and fully dissolved 1 polygon feature:

    Dissolve Result

  • Step 4, unlike the criteria leading to Road_Market_Access.shp where the proximity is a value, there is also the reverse for risk and unsuitability within the current suitability feature - specifically the presence of UXO and urban threats. Two more BUFFER analyses will be done based on the following criteria:

  • Urban Hazard (UrbanHazard.shp) as defined as 5 KM from Populated_Places.shp:

    Distance Buffer

  • UXO Distance (UXOHazards.shp) as defined as 10 KM from UXOs.shp

    Distance Buffer

    • Check BUFFER results, ensuring correct distance and fully dissolved 1 polygon features for both UrbanHazard.shp and UXOHazards.shp:

    Dissolve Result

  • Step 5, There now exists both ‘suitable access’ and ‘risk’ that can be overlaid to find the DIFFERENCE and produce a final result that is the Road and Market access desired (Road_Market_Access.shp) but without the risk of UrbanHazard.shp and UXOHazards.shp. To do this, enact DIFFERENCE twice upon Road_Market_Access.shp, saving the first DIFFERENCE as Diff_1, and the second as Road_Market_Access_final.shp:

    • Enact DIFFERENCE tool:

    Difference

    • Perform the first DIFFERENCE, ensuring that the input and difference layers are correctly ordered. Output as diff_1.shp to exports folder:

    Difference Export

    • Perform the second DIFFERENCE, ensuring that the input and difference layers are correctly ordered. Make sure the input layer is now diff_1.shp as it has been updated by the first DIFFERENCE. Output as Road_Market_Access_final.shp to exports folder:

    Difference

    • Check the DIFFERENCE results in Road_Market_Access_final.shp which should now show missing areas where both UrbanHazard.shp and UXOHazards.shp used to exist:

    Difference Result

  • Step 6, at this juncture, slope exists in raster format and the suitability developed thus far exists in vector format. There are several ways to proceed to get the final suitability. One option is to convert to raster and utilize the raster calculator to find the final suitable locations.

    • To enact vector > raster conversions, there needs to be an attribute in the table to distinquish the new cell values. This is easily done by adding a 1 into the attribute table for Road_Market_Access_final.shp via Field Calculator in a new field value:

    Prepare Column for Vector > Raster Conversion

    • Check Table Result for field value, now containing 1:

    Table Result

  • The v.to.rast tool option can be utilized under Processing Toolbox to enact the conversion:

    Vector > Raster Tool

  • The following parameters are important to determine. Utilize cell size 90 (90 meters) which is the same cell size as the slope raster. Its critical before working with a raster calculator that all input rasters feature the same cell size:

    • Input Layer = Road_Market_Access_final
    • input feature type = polygon
    • source of raster values = val
    • Raster value = 1
    • GRASS GIS 7 region cellsize = 90
    • Rasterized output = AccessRaster.tif

Raster Calculator Parameters

Note: in the conversion step above, we overrode the attribute table value of 1 by using val as source. There are several ways to input the values to the new raster. By explicitly coding in the 1 value to the vector attribute table before rasterization, we cover the basis for flexibility in the v.to.rast tool.

  • the result will be a boolean raster with 90 meter cells where value 1 is suitable:

Conversion Result

  • Step 7, at this juncture, both slope and suitable access are in raster format; raster calculator can now be employed to find the condition where slope = areas with a gradient (slope) of between 2 and 7 degrees and AccessRaster.tif = value of 1 which is the value of suitability of road and market access minus the hazard and urban risk geographies. Use the following parameters in raster calculator:

    • Parameters:

      • Output format = GeoTIFF

      • Output CRS can be the AccessRaster CRS = EPSG:32636

      • Output = raster_suitability.tif to exports

      • The following equation can be used in raster calculator:

      • ( "AccessRaster@1" = 1 ) AND ( "Uganda_Slope@1" >= 2 ) AND ( "Uganda_Slope@1" <= 7 )

Raster Calculator

Note: in the image above, the naming convention for the inputs is slightly different. If you are producing errors in this step, make sure to check that the function inputs are the same naming convention as the input layers in your own project.

  • Check the result. The ‘shape’ of the 1 value cells should now represent AccessRaster, with the range of suitable cells (>=2 asnd <=7) for slope intermingled within the larger shape of AccessRaster:

Raster Result

  • Step 8, the mapping will be for one district within Uganda - Gulu. At this juncture, the raster result can be clipped to just the project area. In order to do so, a clipping layer must be produced which is also the district boundary. Additionally, this export can also be used for the final mapping cartographic design. Export this feature from the Districts.shp as GULU.shp:

    • Select GULU via SQL using Select by Expression. Export as GULU.shp:

SQL Selection

Note: access to selection tools can always be found via Processing Toolbox:

Select by Expression

  • GULU.shp overlaid to the Raster_Suitability.tif:

Gulu + Raster Suitability

Note: at the early stage, we can see where suitable locations will be located (black cells) within GULU.shp.

  • Next, extract the suitable raster cells via clipping - Raster > Extraction > Clip Raster by Mask Layer:
    • Parameters:
      • Input Raster_Suitability.tif
      • Output gulu_suitable.tif
      • Mask layer = GULU.shp
      • Keep resolution of input raster

Extraction Parameters

  • gulu_suitable.tif result:

Result

  • Step 9, gulu_suitable.tif is a boolean raster layer ( originally Raster_Suitability.tif) of values 1 for suitable and 0 for unsuitable across the full extent of the inputs, now only within district GULU. However, IDP camps still need to meet certain size and capacity thresholds; these calculations will be done in vector format. In order to do these areal calculations, a conversion back to vector format will be performed:

Polygonize

  • Parameters:

    • Input = gulu_suitable.tif
    • Output = gulu_suitable)_v.shp to exports

Polygonize Parameters

  • The resulting gulu_suitable_v.shp now has two values in the DN column - 1 for vector polygons that are suitable and 0 for vector polygons that are unsuitable. First, Select by Expression those features which are 1, suitable, and export this selection as SuitableAreas.shp:

Select by Expression

  • Export selection to SuitableAreas.shp and check the result:

Export Selection

  • Step 10, in order to develop a capacity value for each potentially suitable IDP camp location, first AREA must be established in the attribute table for each polygon feature. There are several ways to accomplish AREA as we’ve done in past assignments. Utilize Add Geometry Attributes as the feature is currently projected. This will return square area as square meters (export to temporary memory):

Geometry Attributes for Suitability Result

Note: if you need to Fix Geometries go ahead and do so, and return to Add Geometry Attributes.

  • Check result for AREA in attribute table:

Area Attribute

  • Step 11, the capacity calculation is based on area developed in Step 10 - 45 sq meters per person - a basic requirement of shelter:

    • create a column CAPACITY utilizing the following equation "area"/45:

Capacity Calculation

  • Step 12, the final criteria of the project is contiguous areas that meet all criteria AND feature a CAPACITY between 10,000 and 20,000 IDP persons. The SQL formula for this Selection by Expression is as follows:

    • "CAPACITY" >=10000.000 AND "CAPACITY" <=20000.000
    • The selection should result in 124 qualifying areas:

Imgur

  • Export the selection to GULU_final_suitability.shp - make sure to check Save only selected features

  • Check Result:

Imgur

  • The current polygon features can be mapped allowing the map user access to the shape/size of the features. Alternatively, the capacity of the IDP camps can be shown to good effect utilzing proportional symbolization in vector points. To transform camp polygons to points features Vector > Geometry Tools > Centroids:

Centroids Tool

Centroids Tool Parameters

  • The results (symbolized proportionally) are points centered atop the polygon features symbolized for CAPACITY:

Capacity Quantity in Legend

Centroids can represent Capacity Quantity

Note: for proportional symbolization, refer to thematic mapping, assignment 3.

Map Deliverable:

Refer to Class 9 Assignment Examples for guidance on design and layout. Note that the last map does not utilize proportional symbolization, but the other examples do indeed utilize this technique.

The final map will be uploaded to the assignment submission section for Class 9. Ensure that a title and legend are included.